import request from "@/utils/request"

// 获取用户频道
export const userChannelApi = () => request({
  url: '/v1_0/user/channels'
})

// 获取所有频道
export const allChannelApi = () => request({
  url: '/v1_0/channels'
})

// 获取指定频道文章数据
export const articleListApi = params => request({
  url: '/v1_0/articles',
  params
})

// 删除指定频道
export const delChannelApi = channelId => request({
  url: `/v1_0/user/channels/${channelId}`,
  method: 'DELETE'
})

// 新增频道
export const addChannelApi = data => request({
  url: '/v1_0/user/channels',
  method: 'PATCH',
  data
})